package com.platform.coreentity.controller;

import com.platform.coreentity.entities.SysElementEntity;
import com.platform.coreentity.repository.SysElementRepository;
import com.platform.coreentity.utils.UuidUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * describe:
 *
 * @author rainly
 * @date 2019/07/22
 * @time 16:21
 */

@RestController
public class TestController {

    @Autowired
    private SysElementRepository sysElementRepository;

//    @Autowired
//    private List<BaseRepository> repositoryList;

    @RequestMapping(value = "/getTest",method = RequestMethod.GET)
    public String getTest(){

        SysElementEntity sysElementEntity = new SysElementEntity();
        sysElementEntity.setElementCode("222");
        sysElementEntity = sysElementRepository.save(sysElementEntity);
        System.out.println(new Date());
        return sysElementEntity.getElementId();
    }

}
